package modelLayer;
import java.util.Scanner;
public class Person
{
    private String name, address, city, postalCode, phone;
    public Person(String name, String address, String postalCode, String city, String phone)
    {
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phone = phone;
    }
    
    public Person()
    {
    }
    
    public String getPerson(String choise)
    {
        String returnValue = null;
        switch(choise)
        {
            case "name":
            returnValue = name;
            break;
            
            case "address":
            returnValue = address;
            break;
            
            case "postalCode":
            returnValue = postalCode;
            break;

            case "city":
            returnValue = city;
            break;

            case "phone":
            returnValue = phone;
            break;
        }
        return returnValue;
    }
    
    public void printPerson()
    {
        System.out.println(getPerson("name"));
        System.out.println(getPerson("address"));
        System.out.println(getPerson("postalCode"));
        System.out.println(getPerson("city"));
        System.out.println(getPerson("phone"));
    }
    
    public void setName(String name)
    {
        this.name = name;
    }
    public String getName()
    {
        return name;
    }
    
    public void setAddress(String address)
    {
        this.address = address;
    }
    
    public void setPostalCode(String postalCode)
    {
        this.postalCode = postalCode;
    }
    
    public void setCity(String city)
    {
        this.city = city;
    }
    
    public void setPhone(String phone)
    {
        this.phone = phone;
    }
}
